// Post Summary
  //<![CDATA[
function removeHtmlTag(_0xe543x2, _0xe543x3) {
    if (_0xe543x2['indexOf']('<') != -1) {
        var _0xe543x4 = _0xe543x2['split']('<');
        for (var _0xe543x5 = 0; _0xe543x5 < _0xe543x4['length']; _0xe543x5++) {
            if (_0xe543x4[_0xe543x5]['indexOf']('>') != -1) {
                _0xe543x4[_0xe543x5] = _0xe543x4[_0xe543x5]['substring'](_0xe543x4[_0xe543x5]['indexOf']('>') + 1, _0xe543x4[_0xe543x5]['length']);
            };
        };
        _0xe543x2 = _0xe543x4['join']('');
    };
    _0xe543x3 = (_0xe543x3 < _0xe543x2['length'] - 1) ? _0xe543x3 : _0xe543x2['length'] - 2;
    while (_0xe543x2['charAt'](_0xe543x3 - 1) != ' ' && _0xe543x2['indexOf'](' ', _0xe543x3) != -1) {
        _0xe543x3++;
    };
    _0xe543x2 = _0xe543x2['substring'](0, _0xe543x3 - 1);
    return _0xe543x2 + '...';
};
function createSummaryAndThumb(_0xe543x7) {
    var _0xe543x8 = document['getElementById'](_0xe543x7);
    var _0xe543x9 = '';
    var _0xe543xa = _0xe543x8['getElementsByTagName']('img');
    var _0xe543xb = summary_noimg;
    if (_0xe543xa['length'] >= 1) {
        _0xe543x9 = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="' + _0xe543xa[0]['src'] + '" width="' + img_thumb_width + 'px" height="' + img_thumb_height + 'px"/></span>';
        _0xe543xb = summary_img;
    };
    var _0xe543xc = _0xe543x9 + '<div>' + removeHtmlTag(_0xe543x8['innerHTML'], _0xe543xb) + '</div>';
    _0xe543x8['innerHTML'] = _0xe543xc;
};
  
  
   // Twitter
 (function(a,b,c){var d=a.getElementsByTagName(b)[0];if(!a.getElementById(c)){a=a.createElement(b);a.id=c;a.src="//platform.twitter.com/widgets.js";d.parentNode.insertBefore(a,d)}})(document,"script","twitter-wjs");
 // Stumbleupon
 (function(){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="https://platform.stumbleupon.com/1/widgets.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)})();
/*]]>*/

// Back To Top
$(document).ready(function(){

	// hide #back-top first
	$(&quot;#back-top&quot;).hide();
	
	// fade in #back-top
	$(function () {
		$(window).scroll(function () {
			if ($(this).scrollTop() &gt; 100) {
				$(&#39;#back-top&#39;).fadeIn();
			} else {
				$(&#39;#back-top&#39;).fadeOut();
			}
		});

		// scroll body to 0px on click
		$(&#39;#back-top a&#39;).click(function () {
			$(&#39;body,html&#39;).animate({
				scrollTop: 0
			}, 800);
			return false;
		});
	});

});
   // Related Posts
   //<![CDATA[
var relatedTitles = new Array();
var relatedTitlesNum = 0;
var relatedUrls = new Array();
function related_results_labels(json) {
for (var i = 0; i < json.feed.entry.length; i++) {
var entry = json.feed.entry[i];
relatedTitles[relatedTitlesNum] = entry.title.$t;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
relatedUrls[relatedTitlesNum] = entry.link[k].href;
relatedTitlesNum++;
break;
}
}
}
}
function removeRelatedDuplicates() {
var tmp = new Array(0);
var tmp2 = new Array(0);
for(var i = 0; i < relatedUrls.length; i++) {
if(!contains(tmp, relatedUrls[i])) {
tmp.length += 1;
tmp[tmp.length - 1] = relatedUrls[i];
tmp2.length += 1;
tmp2[tmp2.length - 1] = relatedTitles[i];
}
}
relatedTitles = tmp2;
relatedUrls = tmp;
}
function contains(a, e) {
for(var j = 0; j < a.length; j++) if (a[j]==e) return true;
return false;
}
function printRelatedLabels() {
var r = Math.floor((relatedTitles.length - 1) * Math.random());
var i = 0;
document.write('<ul>');
while (i < relatedTitles.length && i < 6) {
document.write('<li><a href="' + relatedUrls[r] + '">' + relatedTitles[r] + '</a></li>');
if (r < relatedTitles.length - 1) {
r++;
} else {
r = 0;
}
i++;
}
document.write('</ul>');
}
//]]>